#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
#include<assert.h>

void convert(char* p, int k,size_t sz)
{
	char arr[] = "ABCD";
	int i = 0;
	char* start = p+k;
	assert(k >= 0&&k < sz);
	while (*start)
	{
		*p++ = *start++;
	}
	while (*p)
	{
		*p++ = arr[i++];
	}
}
	

int main()
{
	while(1)
	{
		char arr[] = "ABCD";
		size_t sz = strlen(arr);
		int k = 0;
		scanf("%d", &k);
		convert(arr, k, sz);
		printf("%s\n", arr);
	}


	return 0;
}